package com.hontech.pastacooking.conn

import com.hontech.pastacooking.serial.SerialType
import com.hontech.pastacooking.serial.UInt32
import com.hontech.pastacooking.serial.UInt8
import com.hontech.pastacooking.utils.S



suspend fun requestWeight(timeout: Long, req: Int, args: Array<SerialType>, exceptMsg: String) {
    Device.request(timeout, Addr.Weight, req, args, exceptMsg)
}
suspend fun adjWeight(id: Int, value: Int) {
    requestWeight(
        3 * 1000,
        WeightProto.Adj,
        arrayOf(UInt8(id), UInt32(value)),
        S.t264
    )
}

